package com.asiainfo.dacp.datastash.broker.tracelog;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

/**
 * 日志的抽象
 * @author MeiKefu
 * @date 2017-11-30
 */
@Component
public class StashTraceLogger {

    @Autowired
    private StashTraceLogFacade stashTraceLogFacade;

    public void info(StashTraceLogVo logVo){
        stashTraceLogFacade.pushStashTraceLog(logVo);
    }

    public void warn(StashTraceLogVo logVo){
        stashTraceLogFacade.pushStashTraceLog(logVo.level("warn"));
    }

    public void error(StashTraceLogVo logVo){
        stashTraceLogFacade.pushStashTraceLog(logVo.level("error"));
    }

    public void debug(StashTraceLogVo logVo){
        stashTraceLogFacade.pushStashTraceLog(logVo.level("debug"));
    }
}
